declare namespace g = "ddi:group:3_1";
declare namespace dc="ddi:dcelements:3_1";
declare namespace d="ddi:datacollection:3_1"; 
declare namespace dc2="http://purl.org/dc/elements/1.1/"; 
declare namespace s="ddi:studyunit:3_1"; 
declare namespace c="ddi:conceptualcomponent:3_1";
declare namespace r="ddi:reusable:3_1"; 
declare namespace a="ddi:archive:3_1"; 
declare namespace ddi="ddi:instance:3_1"; 
declare namespace l="ddi:logicalproduct:3_1";

declare option exist:serialize "method=text media-type=text/x-gettext-translation";

import module namespace request="http://exist-db.org/xquery/request";
import module namespace transform="http://exist-db.org/xquery/transform";

let $study_id := request:get-parameter("id", ())

let $root := collection('/db/ddi3/internal')/ddi:DDIInstance[s:StudyUnit[@id = $id]

return
transform:transform($root, xs:anyURI("xmldb:exist:///db/ddi3/xslt/ddi3-questionText-to-po.xsl"), ())